#include "YaoReader.h"

YaoPacket::YaoPacket()
{
    avPacket = av_packet_alloc();
}

YaoPacket::~YaoPacket()
{
    if(avPacket != nullptr){
        av_packet_free(&avPacket);
        avPacket = nullptr;
    }
}

int YaoPacket::GetPktStreamIndex()
{
    return avPacket->stream_index;
}

int64_t YaoPacket::GetPktDuration()
{
    return avPacket->duration;
};